#include <bits/stdc++.h>
#define ru(i,l,r) for(int i=(l);i<(r);i++)

using namespace std;

int main(){
    int t;cin>>t;
    while(t--){
        int n,q;cin>>n>>q;
        vector<int>a(n);set<int>pos;
        ru(i,0,n){
            cin>>a[i];
            if(a[i]==1)pos.insert(i);
        }
        while(q--){
            int cmd;cin>>cmd;
            if(cmd==1){
                int v;cin>>v; int num=pos.size();
                if((v-num)&1){
                    if(num==0)cout<<"no";
                    else{
                        int s1=2* *pos.begin()-(num-1);
                        int s2=2*(n-*pos.begin()-1)-(num-1);
                        if(v<=max(s1,s2))cout<<"yes";
                        else cout<<"no";
                    }
                }else{
                    if(v<=2*n-num)cout<<"yes";
                    else cout<<"no";
                }
                cout<<endl;
            }else{
                int i;cin>>i;i--;
                pos.erase(i);cin>>a[i];
                if(a[i]==1)pos.insert(i);
            }
        }
    }
}